package com.example.board.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户
 * </p>
 *
 * @author xiaoqi
 * @since 2022-10-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_user")
@ApiModel(value="User对象", description="用户")
public class User implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "ID")
      @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "昵称")
    private String nickname;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "用户登录类型")
    @TableField("login_type")
    private Boolean loginType;

    @ApiModelProperty(value = "手机")
    private String phone;

    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "头像地址")
    private String avatar;

    @ApiModelProperty(value = "性别 0未知,1男,2女")
    private Boolean sex;

    @ApiModelProperty(value = "部门编号")
    @TableField("dept_id")
    private Long deptId;

    @ApiModelProperty(value = "岗位编号")
    @TableField("job_id")
    private Long jobId;

    @ApiModelProperty(value = "状态：1启用、0禁用")
    private Boolean enabled;

    @ApiModelProperty(value = "最后修改密码的日期")
    @TableField("last_password_reset_time")
    private LocalDateTime lastPasswordResetTime;

    @ApiModelProperty(value = "最后登录时间")
    @TableField("last_login_time")
    private LocalDateTime lastLoginTime;

    @ApiModelProperty(value = "创建时间")
    @TableField("created_at")
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "创建人")
    @TableField("created_by")
    private Long createdBy;

    @ApiModelProperty(value = "逻辑删除时间")
    @TableField("deleted_at")
    private LocalDateTime deletedAt;

    @ApiModelProperty(value = "修改时间")
    @TableField("updated_at")
    private LocalDateTime updatedAt;

    @ApiModelProperty(value = "修改人")
    @TableField("updated_by")
    private Long updatedBy;

    @ApiModelProperty(value = "用户编号")
    private String code;

    @ApiModelProperty(value = "是否业务员/推广员")
    @TableField("on_tool_man")
    private String onToolMan;

    @ApiModelProperty(value = "邀请者id")
    @TableField("inviter_id")
    private Long inviterId;

    @JsonIgnore
    @TableField(exist = false)
    private String deptName;



}
